#include <boost/intrusive/list.hpp>
#include <string>
#include <iostream>

struct person : public boost::intrusive::list_base_hook<>
{
	std::string m_name;
	int m_age;
	person(std::string name, int age) : m_name(name), m_age(age) {}
};

int main()
{
	person p1("Euler",20);
    person p2("Gauss",21);
    person p3("Poincare",22);

	typedef boost::intrusive::list<person> person_list;
	person_list pl;

	pl.push_back(p1);
	pl.push_back(p2);
	pl.push_back(p3);

	p3.m_name = "Hilbert";

	for (person_list::iterator it = pl.begin(); it!=pl.end(); ++it)
		std::cout << it->m_name << std::endl;
}